// Copyright (C) 2022 Huawei Device Co., Ltd.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package model

import "time"

type HomePageChar struct {
	Key    string `json:"key"`
	Date   string `json:"date"`
	Value  int    `json:"value"`
	Index  int    `json:"index"`
	UserId int    `json:"userId"`
}

type Record struct {
	Ts       time.Time
	Action   string
	Event    string
	ExpandId int64
}

type RecordExp struct {
	ExpandId      int64
	ExpandContent string
}

type PageDistributionStruct struct {
	PageName    string `json:"pageName"`
	AccessCount int32  `json:"accessCount"`
}

type ChartData struct {
	Date  string `json:"date"`
	Value int    `json:"value"`
}

type PluginsData struct {
	PluginName string `json:"pluginName"`
	UseCount   int32  `json:"useCount"`
}

type CmdUseData struct {
	Offline []ChartData `json:"offline"`
	Online  []ChartData `json:"online"`
}

type DownloadData struct {
	DownLoadDB   []ChartData `json:"downLoadDB"`
	DownLoadFile []ChartData `json:"downLoadFile"`
}

type RowData struct {
	RowType string `json:"rowdata"`
	SubType string `json:"subtype"`
	Count   int    `json:"count"`
}
type ResponseData struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type BusinessUseData struct {
	Date  string `json:"date"`
	Type  string `json:"type"`
	Value int    `json:"value"`
}

type GeneralRecord struct {
	Ts        time.Time
	Category  string
	SecondCat string
	ThirdCat  string
}

type GeneralRecordData struct {
	Date      string `json:"date"`
	Category  string `json:"category"`
	SecondCat string `json:"secondCat"`
	ThirdCat  string `json:"thirdCat"`
	Value     int    `json:"value"`
}
